﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Media.MediaProperties;
using Windows.Storage.Streams;

namespace Microsoft.Media.FragmentedMediaSink
{
    public sealed class FragmentController : IFragmentController
    {
        public event EventHandler<Fragment> FragmentCreated;

        public Windows.Storage.Streams.IRandomAccessStream StartFragment()
        {
            return new InMemoryRandomAccessStream();
        }

        public void FragmentCompleted(Fragment fragment)
        {
            if (FragmentCreated != null) FragmentCreated(this, fragment);
        }

        public TimeSpan FragmentSize { get; set; }

        public IMediaEncodingProperties EncodingProperties { get; set; }
    }
}
